A well-known phase detector circuit is the double-balanced mixer or Gilbert cell 100, as shown in FIG. 1. Two differential signals are applied to this mixer cell and the differential output voltage of the mixer is then used as the information source for the phase difference. V1 (V1plus−V1minus) is applied to the upper pairs of transistors 102a, 102b and V2 (V2plus−V2minus) is applied to the lower pair of transistors 104a, 104b. Whenever the voltage V2p is higher than the voltage V2m, the current will take the left branch 106a and when V2m is higher than V2p the current will take the right branch 106b. When a square way signal is connected to the bottom pair V2p and V2m, the current will alternatively and continually switch between the branches 106a and 106b. The Itail currents of the upper pairs of transistors 102a, 102b, 102c and 102d are controlled by the bottom pair of transistors 104a and 104b. Similarly, whenever V1p is higher than V1m, the current will alternatively take the left branches 108a and 108b and via collector resistor Rc1. The current will take the right branches 108a2 and 108b2 and via collector resistor Rc2 when the voltage V1m is higher than V1p. The mixer output is connected to the supply rail (Vcc) via two collector resistors Rc. V1 and V2 are considered to be sufficiently high so that the mixer is switching properly. If in that case, the average value 110 of the differential output voltage of the mixer is plotted as a function of the input phase-difference, the output phase-characteristic is obtained, as shown in FIG. 2. The output voltage VPD-Out is zero when the phase difference is 90 degrees and approximates Rc*Itail when the phase difference is 180 degrees. When the phase difference is 0 degree, this is equivalent to the current taking the furthest left branch of the mixer 100 in FIG. 1 and when the phase difference is 180 degrees, this is equivalent to the current taking the furthest right branch in the mixer 100. The capacitors are here used to realize the averaging. The double balanced mixer 100 is a phase detector of a multiplicative type. The phase characteristic is periodic with tops that are ‘rounded off’ due to, for example, a certain inertia or switching slowness of the transistors. Depending on the mixer speed and input frequency, the area where the positive and negative tops of the phase characteristics are ‘rounded off’ can be smaller or larger. The imperfections of the transistors in the mixer are particularly apparent at and close to phase differences of 0 or 180 degrees. One problem of the prior art mixer 100 is that the average output voltage which is used to represent the phase difference of the two square input signals, is not accurate.
In the prior art systems, the approximate input phase-difference Δφ is determined by examining the average differential output voltage and using a reference voltage. The maximum (extrapolated) output voltage corresponds to Itail*Rc wherein Itail is the mixer tail current and Rc is the collector resistor value of the resistors. The output phase difference is then approximately:Δφ=90+90*{VPD-out/(Itail*Rc)} degreesWhen the output phase difference Δφ is 45 degrees, the average voltage VPD-Out is about Itail*Rc/2. As indicated above, the use of Itail in the formula is not correct due to the losses in the mixer 100 and the real value of the current (I) coming out of the top part of the mixer 100 can be substantially different from Itail especially at high frequencies. However, it is difficult to determine what this value of the current (I) should be. Thus, the above approximation has a many accuracy drawbacks, as listed below:
1. The assumption that the sum of the two output currents of the mixer is identical to the tail current Itail which is not correct. Because of the finite beta of the transistors and all kinds of parasitic effects (like injection in the substrate), this assumption is not completely true. The value of Itail*Rc in the above formula should be corrected somewhat but this correction factor is not very predictable and is difficult to determine because it depends on temperature, process and other properties that are difficult to determine. The sum of the two currents (left and right side) coming out of the mixer 100 is thus different from the incoming current Itail.
2. The ‘rounding off’ in the positive and negative tops of the characteristic affects illustrates an undesirable flaw of deviation partly due to speed problems of the transistors i.e. the transistors cannot turn on and off quickly enough when the phase differences are very small. The further away from the 90 degrees input phase-difference, the larger the deviation becomes and the flaw reaches its maximum and 0 and 180 degrees. The most accurate phase measurement is done when the phase difference is exactly 90 degrees and the output differential-voltage VPD-Out is zero.
3. There is an additional error due to the fact that the voltages at the two outputs of the mixer are not the same for input phase-differences other than 90 degrees. In that case, the collector to emitter bias voltage of the transistors in the upper mixer pair are not the same which affects the above assumption as well in a way that is not very predictable.
4. Since the load the mixer forms for the two input signals is not the same (V1 is connected to the double top pair which is connected with its collectors to the output and V2 is connected to the single bottom pair which is connected with its collectors to the common emitter nodes of the top pair), the phase difference that corresponds to a 0 Volt differential output voltage is not exactly 90 degrees, but is somewhat shifted due to the imbalance of the mixer 100 in that the upper transistors consist of 4 transistors while the lower transistors only consist of 2 transistors. In other words, because of this, the complete phase characteristics is shifted in the x-direction.
As shown in FIG. 3, it is possible to correct this imbalance by placing a second mixer 112 in parallel that is connected to the same input signals that are now ‘swapped’ i.e. V1 is connected to the bottom pair of transistors while V2 is connected to the top pairs of transistors.
The conventional way of translating the mixer output voltage VPD-Out into a phase difference is problematic because:
1. A voltage reference is needed that is proportional to Itail*Rc,
2. A correction should be realized that accommodates for inaccurate transistor properties like finite beta, temperature and process dependency,
3. An extra error can be expected due to speed limitations that will be there for all input phase differences which is to be more severe further away from 90 degrees and which finally results in the undesirable ‘rounding off’ of the tops of the characteristic,
4. An extra partly unpredictable deviation from the ideal phase characteristic can be expected when the average differential mixer output voltage differs from 0V, and
5. An error can be expected due to the asymmetrical loading of the input signals.
The method of the present invention provides a solution to many of the above-outlined problems. It solves problems 1, 2 and 4 above. Problem 3 is a fundamental problem for all mixer circuits. However, since the phase detector of the present invention has a differential mixer output voltage of zero, the present invention performs better with respect to problem 3 also. Problem 5 is not solved but can be compensated in the same way as with conventional phase detectors by using a second mixer with swapped inputs in parallel. More particularly, the method determines an input phase differential (Δφ) between two input signals such as sine inputs that have been converted to square wave signals by limiter amplifiers. An important feature of the present invention is that there is no need for using a standard voltage reference at all because an important notion is that the input phase differential is contained in the ratio of the differential mode and common mode output currents. Although instead of determining the ratios of the differential mode and common mode output currents, it would be just as good to measure the ratio of the differential and common mode output voltages when the mixer collector resistors are identical (because Vcm=Icm*Rc and Vdm=Idm*Rc). The ratio of the differential mode current and the common mode current is here used an illustrative example. In other words, no voltage is measured relative to a standard voltage reference (like a band-gap reference). Instead, the output voltage differential relative to the common mode voltage is determined instead. If voltages are measured it is preferred that the two mixer collector resistors (Rc1 and Rc2) are identical. Therefore, the ratio between the differential mode current (Idm) and the common mode current (Icm) is preferably used instead. It is to be understood that it is quite difficult to determine the phase differential by measuring the differential mode voltage (Vdm) and divide this by the common mode voltage (Vcm). It is much easier to instead use a standard voltage reference (such as Rc*Itail) which is one reason why the ratio between differential voltage mode and the common mode voltage has not been used before to determine the phase differential in a mixer. It is easier, as was done in the past, to predict the common mode voltage as accurate as possible by using the voltage reference and generating the tail current of the mixer from it by using the same type of resistor. The output differential voltage may thus be used to derive the phase difference by measuring the common mode voltage and use that as a reference. It is less accurate to try to predict the common mode voltage (compensation) as it was done in the past. A second important notion of the present invention is that the phase information can not only be derived from the ratio of the differential mode and common mode voltage but that the primary ratio for determining the phase difference is the ratio between the differential mode current (Idm) and the common mode current (Icm). As described in detail below, a third important notion of the present invention is that when the two resistors of the mixer are not the same, a potentiometer can surprisingly be used to indicate what the ratio of the differential mode current (Idm) and the common mode current (Icm) is.
More particularly, a high-frequency phase detector is provided that has pairs of transistors and a first impedance (R1) connected to a first branch carrying a first signal (Iout_left) and a second impedance (R2) connected to a second branch carrying a second signal (Iout_right). The first signal (Iout_left) in the first branch is set as a first sum of a common mode output signal (Icm) and a differential mode output signal (Idm). The second signal (Iout_right) in the second branch is set as a second sum of the common mode output signal (Icm) minus the differential mode output signal (Idm). A relationship between the first impedance (R1) and the second impedance (R2) is adjusted until a differential mode output voltage (Vdm) of the phase detector is zero. The input phase differential (Δφ) is determined when the differential mode output voltage (Vdm) is zero.